import request from '@/utils/request'

// 查询来访记录列表
export function listVisiting(query) {
  return request({
    url: '/visiting/visiting/list',
    method: 'get',
    params: query
  })
}

// 查询来访记录详细
export function getVisiting(receiveId) {
  return request({
    url: '/visiting/visiting/' + receiveId,
    method: 'get'
  })
}

// 新增来访记录
export function addVisiting(data) {
  return request({
    url: '/visiting/visiting',
    method: 'post',
    data: data
  })
}

// 修改来访记录
export function updateVisiting(data) {
  return request({
    url: '/visiting/visiting',
    method: 'put',
    data: data
  })
}

// 删除来访记录
export function delVisiting(receiveId) {
  return request({
    url: '/visiting/visiting/' + receiveId,
    method: 'delete'
  })
}
